<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录页面</title>
    <%
        Cookie[] cookies = request.getCookies();
        String username = "";
        for (int i = 0; i < cookies.length; i++) {
            Cookie cookie = cookies[i];
            if ("username".equals(cookie.getName())) {
                username = cookie.getValue();
                break;
            }
        }
    %>
</head>
<body>
<form action="./login.do" method="get">
    用户名：<input type="text" name="username" value="<%=username%>"/><br/>
    密码:<input type="password" name="password"/><br/>
    <button type="submit">登录</button>
</form>
</body>
</html>
